package com.itheima.修饰符.权限修饰符.test1;

public class Fu {
    //private:私有权限,仅限于本类中访问
    private String name = "东方不败";
    //不写权限,表示默认权限,支持同一个包下访问
    int age = 666;
    //protected: 受保护的权限,支持同一个包下的类访问和跨包子类访问
    protected double height = 2.26;
    //public:支持全部类的访问
    public double weight = 888;

    public void method(){
        System.out.println(name);
        System.out.println(age);
        System.out.println(height);
        System.out.println(weight);
    }
}
class Zi extends Fu{
    public void method(){
        //System.out.println(name);
        System.out.println(age);
        System.out.println(height);
        System.out.println(weight);
    }
}
